home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac Interfaces / AIncludes / RAVE.a < prev    next >
Encoding:
Text File  |  1999-05-18  |  47.0 KB  |  1,119 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        RAVE.a
  3. ;
  4. ;    Contains:    Interface for RAVE (Renderer Acceleration Virtual Engine)                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.6
  7. ;                Release:    QuickTime 4.0
  8. ;
  9. ;    Copyright:    Â© 1995-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__RAVE__') = 'UNDEFINED' THEN
  18. __RAVE__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.  
  24.     IF TARGET_OS_MAC THEN
  25.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  26.     include 'MacTypes.a'
  27.     ENDIF
  28.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  29.     include 'Quickdraw.a'
  30.     ENDIF
  31.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  32.     include 'QDOffscreen.a'
  33.     ENDIF
  34.  
  35.     ENDIF    ; TARGET_OS_MAC
  36.     IF TARGET_OS_WIN32 THEN
  37.     IF &TYPE('RAVE_NO_DIRECTDRAW') = 'UNDEFINED' THEN
  38.     ENDIF
  39.     ENDIF    ; TARGET_OS_WIN32
  40.     RAVE_OBSOLETE: SET 0
  41. ; ******************************************************************************
  42. ; *
  43. ; * Platform dependent datatypes: TQAImagePixelType, TQADevice, TQAClip, and TQARect.
  44. ; *
  45. ; ****************************************************************************
  46.  
  47.  
  48. ; typedef long                            TQAImagePixelType
  49. kQAPixel_Alpha1                    EQU        0                    ; 1 bit/pixel alpha 
  50. kQAPixel_RGB16                    EQU        1                    ; 16 bits/pixel, R=14:10, G=9:5, B=4:0 
  51. kQAPixel_ARGB16                    EQU        2                    ; 16 bits/pixel, A=15, R=14:10, G=9:5, B=4:0 
  52. kQAPixel_RGB32                    EQU        3                    ; 32 bits/pixel, R=23:16, G=15:8, B=7:0 
  53. kQAPixel_ARGB32                    EQU        4                    ; 32 bits/pixel, A=31:24, R=23:16, G=15:8, B=7:0 
  54. kQAPixel_CL4                    EQU        5                    ; 4 bit color look up table, always big endian, ie high 4 bits effect left pixel 
  55. kQAPixel_CL8                    EQU        6                    ; 8 bit color look up table 
  56. kQAPixel_RGB16_565                EQU        7                    ; Win32 ONLY  16 bits/pixel, no alpha, R:5, G:6, B:5 
  57. kQAPixel_RGB24                    EQU        8                    ; Win32 ONLY  24 bits/pixel, no alpha, R:8, G:8, B:8 
  58. kQAPixel_RGB8_332                EQU        9                    ; 8 bits/pixel, R=7:5, G = 4:2, B = 1:0 
  59. kQAPixel_ARGB16_4444            EQU        10                    ; 16 bits/pixel, A=15:12, R=11:8, G=7:4, B=3:0 
  60. kQAPixel_ACL16_88                EQU        11                    ; 16 bits/pixel, A=15:8, CL=7:0, 8 bit alpha + 8 bit color lookup 
  61. kQAPixel_I8                        EQU        12                    ; 8 bits/pixel, I=7:0, intensity map (grayscale) 
  62. kQAPixel_AI16_88                EQU        13                    ; 16 bits/pixel, A=15:8, I=7:0, intensity map (grayscale) 
  63. kQAPixel_YUVS                    EQU        14                    ; 16 bits/pixel, QD's kYUVSPixelFormat (4:2:2, YUYV ordering, unsigned UV) 
  64. kQAPixel_YUVU                    EQU        15                    ; 16 bits/pixel, QD's kYUVUPixelFormat (4:2:2, YUYV ordering, signed UV) 
  65. kQAPixel_YVYU422                EQU        16                    ; 16 bits/pixel, QD's kYVYU422PixelFormat (4:2:2, YVYU ordering, unsigned UV) 
  66. kQAPixel_UYVY422                EQU        17                    ; 16 bits/pixel, QD's kUYVY422PixelFormat (4:2:2, UYVY ordering, unsigned UV) 
  67.  
  68. ; typedef long                            TQAColorTableType
  69. kQAColorTable_CL8_RGB32            EQU        0                    ; 256 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0 
  70. kQAColorTable_CL4_RGB32            EQU        1                    ; 16 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0 
  71. ;  Selects target device type 
  72.  
  73. ; typedef long                            TQADeviceType
  74. kQADeviceMemory                    EQU        0                    ; Memory draw context 
  75. kQADeviceGDevice                EQU        1                    ; Macintosh GDevice draw context 
  76. kQADeviceWin32DC                EQU        2                    ; Win32 DC 
  77. kQADeviceDDSurface                EQU        3                    ; Win32 DirectDraw Surface 
  78. ;  Generic memory pixmap device 
  79. TQADeviceMemory            RECORD 0
  80. rowBytes                 ds.l    1                ; offset: $0 (0)        ;  Rowbytes 
  81. pixelType                 ds.l    1                ; offset: $4 (4)        ;  Depth, color space, etc. 
  82. width                     ds.l    1                ; offset: $8 (8)        ;  Width in pixels 
  83. height                     ds.l    1                ; offset: $C (12)        ;  Height in pixels 
  84. baseAddr                 ds.l    1                ; offset: $10 (16)        ;  Base address of pixmap 
  85. sizeof                     EQU *                    ; size:   $14 (20)
  86.                         ENDR
  87. ;  Offscreen Device 
  88. TQADeviceOffscreen        RECORD 0
  89. pixelType                 ds.l    1                ; offset: $0 (0)        ;  Depth, color space, etc. 
  90. sizeof                     EQU *                    ; size:   $4 (4)
  91.                         ENDR
  92. ;  Selects target clip type 
  93.  
  94. ; typedef long                            TQAClipType
  95. kQAClipRgn                        EQU        0                    ; Macintosh clipRgn with serial number 
  96. kQAClipWin32Rgn                    EQU        1                    ; Win32 clip region 
  97. TQARect                    RECORD 0
  98. left                     ds.l    1                ; offset: $0 (0)
  99. right                     ds.l    1                ; offset: $4 (4)
  100. top                         ds.l    1                ; offset: $8 (8)
  101. bottom                     ds.l    1                ; offset: $C (12)
  102. sizeof                     EQU *                    ; size:   $10 (16)
  103.                         ENDR
  104.     IF TARGET_OS_MAC THEN
  105. TQAPlatformDevice        RECORD 0
  106. memoryDevice             ds        TQADeviceMemory ; offset: $0 (0)
  107.                          ORG 0
  108. gDevice                     ds.l    1                ; offset: $0 (0)
  109.                          ORG 20
  110. sizeof                     EQU *                    ; size:   $14 (20)
  111.                         ENDR
  112. TQAPlatformClip            RECORD 0
  113. clipRgn                     ds.l    1                ; offset: $0 (0)
  114. sizeof                     EQU *                    ; size:   $4 (4)
  115.                         ENDR
  116. ; typedef long                             TQADrawNotificationProcRefNum
  117.  
  118. ;  used to unregister your proc 
  119.     ELSEIF TARGET_OS_WIN32 THEN
  120.     ELSE
  121. ;     * Generic platform supports memory device only. TQARect is generic. TQAClip is ???.
  122. ;     
  123.  
  124. TQAPlatformDevice        RECORD 0
  125. memoryDevice             ds        TQADeviceMemory ; offset: $0 (0)
  126. sizeof                     EQU *                    ; size:   $14 (20)
  127.                         ENDR
  128. TQAPlatformClip            RECORD 0
  129. region                     ds.l    1                ; offset: $0 (0)        ;  ??? 
  130. sizeof                     EQU *                    ; size:   $4 (4)
  131.                         ENDR
  132.     ENDIF    ; 
  133. TQADevice                RECORD 0
  134. deviceType                 ds.l    1                ; offset: $0 (0)
  135. device                     ds        TQAPlatformDevice ; offset: $4 (4)
  136. sizeof                     EQU *                    ; size:   $18 (24)
  137.                         ENDR
  138. TQAClip                    RECORD 0
  139. clipType                 ds.l    1                ; offset: $0 (0)
  140. clip                     ds        TQAPlatformClip ; offset: $4 (4)
  141. sizeof                     EQU *                    ; size:   $8 (8)
  142.                         ENDR
  143. ; ******************************************************************************
  144. ; *
  145. ; * Basic data types.
  146. ; *
  147. ; ****************************************************************************
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. ;  A single triangle element for QADrawTriMesh 
  171. TQAIndexedTriangle        RECORD 0
  172. triangleFlags             ds.l    1                ; offset: $0 (0)        ;  Triangle flags, see kQATriFlags_ 
  173. vertices                 ds.l    3                ; offset: $4 (4)        ;  Indices into a vertex array 
  174. sizeof                     EQU *                    ; size:   $10 (16)
  175.                         ENDR
  176. ;  An image for use as texture or bitmap 
  177. TQAImage                RECORD 0
  178. width                     ds.l    1                ; offset: $0 (0)        ;  Width of pixmap 
  179. height                     ds.l    1                ; offset: $4 (4)        ;  Height of pixmap 
  180. rowBytes                 ds.l    1                ; offset: $8 (8)        ;  Rowbytes of pixmap 
  181. pixmap                     ds.l    1                ; offset: $C (12)        ;  Pixmap 
  182. sizeof                     EQU *                    ; size:   $10 (16)
  183.                         ENDR
  184. ;  a pixel buffer 
  185. TQAPixelBuffer            RECORD 0
  186. f                         ds        TQADeviceMemory
  187. sizeof                     EQU *                    ; size:   $14 (20)
  188.                         ENDR
  189.  
  190.  
  191. ;  a zbuffer 
  192. TQAZBuffer                RECORD 0
  193. width                     ds.l    1                ; offset: $0 (0)        ;  Width of pixmap 
  194. height                     ds.l    1                ; offset: $4 (4)        ;  Height of pixmap 
  195. rowBytes                 ds.l    1                ; offset: $8 (8)        ;  Rowbytes of pixmap 
  196. zbuffer                     ds.l    1                ; offset: $C (12)        ;  pointer to the zbuffer data 
  197. zDepth                     ds.l    1                ; offset: $10 (16)        ;  bit depth of zbuffer (16,24,32...) 
  198. isBigEndian                 ds.l    1                ; offset: $14 (20)        ;  true if zbuffer values are in big-endian format, false if little-endian 
  199. sizeof                     EQU *                    ; size:   $18 (24)
  200.                         ENDR
  201. ;  Standard error type 
  202.  
  203. ; typedef long                            TQAError
  204. kQANoErr                        EQU        0                    ; No error 
  205. kQAError                        EQU        1                    ; Generic error flag 
  206. kQAOutOfMemory                    EQU        2                    ; Insufficient memory 
  207. kQANotSupported                    EQU        3                    ; Requested feature is not supported 
  208. kQAOutOfDate                    EQU        4                    ; A newer drawing engine was registered 
  209. kQAParamErr                        EQU        5                    ; Error in passed parameters 
  210. kQAGestaltUnknown                EQU        6                    ; Requested gestalt type isn't available 
  211. kQADisplayModeUnsupported        EQU        7                    ; Engine cannot render to the display in its current , 
  212.                                                             ; mode, but could if it were in some other mode 
  213. kQAOutOfVideoMemory                EQU        8                    ; There is not enough VRAM to support the desired context dimensions 
  214. ;  TQABoolean 
  215. ; typedef unsigned char                 TQABoolean
  216.  
  217. ; ************************************************************************************************
  218. ; *
  219. ; * Vertex data types.
  220. ; *
  221. ; **********************************************************************************************
  222.  
  223. ; * TQAVGouraud is used for Gouraud shading. Each vertex specifies position, color and Z.
  224. ; *
  225. ; * Alpha is always treated as indicating transparency. Drawing engines which don't
  226. ; * support Z-sorted rendering use the back-to-front transparency blending functions
  227. ; * shown below. (ARGBsrc are the source (new) values, ARGBdest are  the destination
  228. ; * (previous) pixel values.)
  229. ; *
  230. ; *        Premultiplied                            Interpolated
  231. ; *
  232. ; *        A = 1 - (1 - Asrc) * (1 - Adest)        A = 1 - (1 - Asrc) * (1 - Adest) 
  233. ; *        R = (1 - Asrc) * Rdest + Rsrc            R = (1 - Asrc) * Rdest + Asrc * Rsrc
  234. ; *        G = (1 - Asrc) * Gdest + Gsrc            G = (1 - Asrc) * Gdest + Asrc * Gsrc
  235. ; *        B = (1 - Asrc) * Bdest + Bsrc            B = (1 - Asrc) * Bdest + Asrc * Bsrc
  236. ; *
  237. ; * Note that the use of other blending modes to implement antialiasing is performed
  238. ; * automatically by the drawing engine when the kQATag_Antialias variable !=
  239. ; * kQAAntiAlias_Fast. The driving software should continue to use the alpha fields
  240. ; * for transparency even when antialiasing is being used (the drawing engine will
  241. ; * resolve the multiple blending requirements as best as it can).
  242. ; *
  243. ; * Drawing engines which perform front-to-back Z-sorted rendering should replace
  244. ; * the blending function shown above with the equivalent front-to-back formula.
  245.  
  246. TQAVGouraud                RECORD 0
  247. x                         ds        Float32            ; offset: $0 (0)        ;  X pixel coordinate, 0.0 <= x < width 
  248. y                         ds        Float32            ; offset: $4 (4)        ;  Y pixel coordinate, 0.0 <= y < height 
  249. z                         ds        Float32            ; offset: $8 (8)        ;  Z coordinate, 0.0 <= z <= 1.0 
  250. invW                     ds        Float32            ; offset: $C (12)        ;  1 / w; required only when kQAPerspectiveZ_On is set 
  251. r                         ds        Float32            ; offset: $10 (16)        ;  Red, 0.0 <= r <= 1.0 
  252. g                         ds        Float32            ; offset: $14 (20)        ;  Green, 0.0 <= g <= 1.0 
  253. b                         ds        Float32            ; offset: $18 (24)        ;  Blue, 0.0 <= b <= 1.0 
  254. a                         ds        Float32            ; offset: $1C (28)        ;  Alpha, 0.0 <= a <= 1.0, 1.0 is opaque 
  255. sizeof                     EQU *                    ; size:   $20 (32)
  256.                         ENDR
  257. ; * TQAVTexture is used for texture mapping. The texture mapping operation
  258. ; * is controlled by the kQATag_TextureOp variable, which is a mask of
  259. ; * kQATextureOp_None/Modulate/Highlight/Decal. Below is pseudo-code for the
  260. ; * texture shading operation:
  261. ; *
  262. ; *        texPix = TextureLookup (uq/q, vq/q);
  263. ; *        if (kQATextureOp_Decal)
  264. ; *        {
  265. ; *            texPix.r = texPix.a * texPix.r + (1 - texPix.a) * r;
  266. ; *            texPix.g = texPix.a * texPix.g + (1 - texPix.a) * g;
  267. ; *            texPix.b = texPix.a * texPix.b + (1 - texPix.a) * b;
  268. ; *            texPix.a = a;
  269. ; *        }
  270. ; *        else
  271. ; *        {
  272. ; *            texPix.a = texPix.a * a;
  273. ; *        }
  274. ; *        if (kQATextureOp_Modulate)
  275. ; *        {
  276. ; *            texPix.r *= kd_r;        // Clamped to prevent overflow
  277. ; *            texPix.g *= kd_g;        // Clamped to prevent overflow
  278. ; *            texPix.b *= kd_b;        // Clamped to prevent overflow
  279. ; *        }
  280. ; *        if (kQATextureOp_Highlight)
  281. ; *        {
  282. ; *            texPix.r += ks_r;        // Clamped to prevent overflow
  283. ; *            texPix.g += ks_g;        // Clamped to prevent overflow
  284. ; *            texPix.b += ks_b;        // Clamped to prevent overflow
  285. ; *        }
  286. ; *
  287. ; * After computation of texPix, transparency blending (as shown
  288. ; * above for TQAVGouraud) is performed.
  289.  
  290. TQAVTexture                RECORD 0
  291. x                         ds        Float32            ; offset: $0 (0)        ;  X pixel coordinate, 0.0 <= x < width 
  292. y                         ds        Float32            ; offset: $4 (4)        ;  Y pixel coordinate, 0.0 <= y < height 
  293. z                         ds        Float32            ; offset: $8 (8)        ;  Z coordinate, 0.0 <= z <= 1.0 
  294. invW                     ds        Float32            ; offset: $C (12)        ;  1 / w (always required) 
  295. ;  rgb are used only when kQATextureOp_Decal is set. a is always required 
  296. r                         ds        Float32            ; offset: $10 (16)        ;  Red, 0.0 <= r <= 1.0 
  297. g                         ds        Float32            ; offset: $14 (20)        ;  Green, 0.0 <= g <= 1.0 
  298. b                         ds        Float32            ; offset: $18 (24)        ;  Blue, 0.0 <= b <= 1.0 
  299. a                         ds        Float32            ; offset: $1C (28)        ;  Alpha, 0.0 <= a <= 1.0, 1.0 is opaque 
  300. ;  uOverW and vOverW are required by all modes 
  301. uOverW                     ds        Float32            ; offset: $20 (32)        ;  u / w 
  302. vOverW                     ds        Float32            ; offset: $24 (36)        ;  v / w 
  303. ;  kd_r/g/b are used only when kQATextureOp_Modulate is set 
  304. kd_r                     ds        Float32            ; offset: $28 (40)        ;  Scale factor for texture red, 0.0 <= kd_r 
  305. kd_g                     ds        Float32            ; offset: $2C (44)        ;  Scale factor for texture green, 0.0 <= kd_g 
  306. kd_b                     ds        Float32            ; offset: $30 (48)        ;  Scale factor for texture blue, 0.0 <= kd_b 
  307. ;  ks_r/g/b are used only when kQATextureOp_Highlight is set 
  308. ks_r                     ds        Float32            ; offset: $34 (52)        ;  Red specular highlight, 0.0 <= ks_r <= 1.0 
  309. ks_g                     ds        Float32            ; offset: $38 (56)        ;  Green specular highlight, 0.0 <= ks_g <= 1.0 
  310. ks_b                     ds        Float32            ; offset: $3C (60)        ;  Blue specular highlight, 0.0 <= ks_b <= 1.0 
  311. sizeof                     EQU *                    ; size:   $40 (64)
  312.                         ENDR
  313. ;*  TQAVMultiTexture allows you to specify the uv and invW values
  314. ;*  for secondary textures.  This data is submitted with the
  315. ;*  QASubmitMultiTextureParams() call.
  316. ;
  317.  
  318. TQAVMultiTexture        RECORD 0
  319. invW                     ds        Float32            ; offset: $0 (0)
  320. uOverW                     ds        Float32            ; offset: $4 (4)
  321. vOverW                     ds        Float32            ; offset: $8 (8)
  322. sizeof                     EQU *                    ; size:   $C (12)
  323.                         ENDR
  324.  
  325. ; ************************************************************************************************
  326. ; *
  327. ; * Constants used for the state variables.
  328. ; *
  329. ; **********************************************************************************************
  330.  
  331. ; * kQATag_xxx is used to select a state variable when calling QASetFloat(), QASetInt(),
  332. ; * QAGetFloat() and QAGetInt(). The kQATag values are split into three separate enumerated
  333. ; * types: TQATagInt, TQATagPtr and TQATagFloat. TQATagInt is used for the QASet/GetInt()
  334. ; * functions, TQATagPtr is used for the QASet/GetPtr() functions, and TQATagFloat is used for 
  335. ; * the QASet/GetFloat() functions. (This is so that a compiler that typechecks enums can flag
  336. ; * a float/int tag mismatch during compile.)
  337. ; *
  338. ; * -=- All tag values must be unique even across all three types. -=-
  339. ; *
  340. ; * These variables are required by all drawing engines:
  341. ; *        kQATag_ZFunction            (Int)    One of kQAZFunction_xxx
  342. ; *        kQATag_ColorBG_a            (Float)    Background color alpha
  343. ; *        kQATag_ColorBG_r            (Float)    Background color red
  344. ; *        kQATag_ColorBG_g            (Float)    Background color green
  345. ; *        kQATag_ColorBG_b            (Float)    Background color blue
  346. ; *        kQATag_Width                (Float)    Line and point width (pixels)
  347. ; *        kQATag_ZMinOffset            (Float)    Min offset to Z to guarantee visibility (Read only!)
  348. ; *        kQATag_ZMinScale            (Float)    Min scale to Z to guarantee visibility (Read only!)
  349. ; * These variables are used for optional features:
  350. ; *        kQATag_Antialias            (Int)    One of kQAAntiAlias_xxx
  351. ; *        kQATag_Blend                (Int)    One of kQABlend_xxx
  352. ; *        kQATag_PerspectiveZ            (Int)    One of kQAPerspectiveZ_xxx
  353. ; *        kQATag_TextureFilter        (Int)    One of kQATextureFilter_xxx
  354. ; *        kQATag_TextureOp            (Int)    Mask of kQATextureOp_xxx
  355. ; *        kQATag_Texture                (Ptr)    Pointer to current TQATexture
  356. ; *        kQATag_CSGTag                (Int)    One of kQACSGTag_xxx
  357. ; *        kQATag_CSGEquation            (Int)    32 bit CSG truth table
  358. ; *        kQATag_FogMode                (Int)   One of kQAFogMode_xxxx
  359. ; *        kQATag_FogColor_a            (Float) Fog color alpha
  360. ; *        kQATag_FogColor_r            (Float) Fog color red
  361. ; *        kQATag_FogColor_g            (Float) Fog color green
  362. ; *        kQATag_FogColor_b            (Float) Fog color blue
  363. ; *        kQATag_FogStart                (Float) Fog start
  364. ; *        kQATag_FogEnd                (Float) Fog end
  365. ; *        kQATag_FogDensity            (Float) Fog density
  366. ; *        kQATag_FogMaxDepth            (Float) Maximun value for 1.0 / invW
  367. ; *        kQATag_MipmapBias             (Float) The mipmap page bias factor
  368. ; *        kQATag_ChannelMask            (Int) one of kQAChannelMask_xxx
  369. ; *        kQATag_ZBufferMask            (Int) one of kQAZBufferMask_xxx
  370. ; *        kQATag_ZSortedHint            (Int) 1 = depth sort transparent triangles, 0 = do not sort.
  371. ; *        kQATag_Chromakey_r            (Float) chroma key red
  372. ; *        kQATag_Chromakey_g            (Float) chroma key green
  373. ; *        kQATag_Chromakey_b            (Float) chroma key blue
  374. ; *        kQATag_ChromakeyEnable        (Int) 1 = enable chroma keying, 0 = disable chroma keying
  375. ; *        kQATag_AlphaTestFunc        (Int) one of kQAAlphaTest_xxx
  376. ; *        kQATag_AlphaTestRef            (Float) from 0 to 1
  377. ; *        kQATag_DontSwap                (Int) 1 = dont swap buffers during QARenderEnd, 0 = do swap buffers during QARenderEnd.
  378. ;
  379. ; *      kQATag_MultiTextureOp       (Int) One of kQAMultiTexture_xxx
  380. ; *        kQATag_MultiTextureFilter   (Int) One of kQATextureFilter_xxx
  381. ; *        kQATag_MultiTextureCurrent    (Int) which multitexture layer to use for all other multitexture funcs
  382. ; *        kQATag_MultiTextureEnable    (Int) how many multitexture layers to use (0 = no multitexturing).
  383. ; *        kQATag_MultiTextureWrapU    (Int)
  384. ; *        kQATag_MultiTextureWrapV    (Int)
  385. ; *        kQATag_MultiTextureMagFilter (Int)
  386. ; *        kQATag_MultiTextureMinFilter (Int)
  387. ; *        kQATag_MultiTextureBorder_a    (Float)
  388. ; *        kQATag_MultiTextureBorder_r    (Float)
  389. ; *        kQATag_MultiTextureBorder_g    (Float)
  390. ; *        kQATag_MultiTextureBorder_b    (Float)
  391. ; *        kQATag_MultiTextureMipmapBias (Float)
  392. ; *        kQATag_MultiTextureFactor     (Float) used with kQAMultiTexture_Fixed to determine blending factor
  393. ; *
  394. ; * These variables are used for OpenGLâ„¢ support:
  395. ; *        kQATagGL_DrawBuffer            (Int)    Mask of kQAGL_DrawBuffer_xxx
  396. ; *        kQATagGL_TextureWrapU        (Int)    kQAGL_Clamp or kQAGL_Repeat
  397. ; *        kQATagGL_TextureWrapV        (Int)    kQAGL_Clamp or kQAGL_Repeat
  398. ; *        kQATagGL_TextureMagFilter    (Int)    kQAGL_Nearest or kQAGL_Linear
  399. ; *        kQATagGL_TextureMinFilter    (Int)    kQAGL_Nearest, etc.
  400. ; *        kQATagGL_ScissorXMin        (Int)    Minimum X value for scissor rectangle
  401. ; *        kQATagGL_ScissorYMin        (Int)    Minimum Y value for scissor rectangle
  402. ; *        kQATagGL_ScissorXMax        (Int)    Maximum X value for scissor rectangle
  403. ; *        kQATagGL_ScissorYMax        (Int)    Maximum Y value for scissor rectangle
  404. ; *        kQATagGL_BlendSrc            (Int)    Source blending operation
  405. ; *        kQATagGL_BlendDst            (Int)    Destination blending operation
  406. ; *        kQATagGL_LinePattern        (Int)    Line rasterization pattern
  407. ; *        kQATagGL_AreaPattern0        (Int)    First of 32 area pattern registers
  408. ; *        kQATagGL_AreaPattern31        (Int)    Last of 32 area pattern registers
  409. ; *
  410. ; *        kQATagGL_DepthBG            (Float)    Background Z
  411. ; *        kQATagGL_TextureBorder_a    (Float)    Texture border color alpha
  412. ; *        kQATagGL_TextureBorder_r    (Float)    Texture border color red
  413. ; *        kQATagGL_TextureBorder_g    (Float)    Texture border color green
  414. ; *        kQATagGL_TextureBorder_b    (Float)    Texture border color blue
  415. ; *
  416. ; * Tags >= kQATag_EngineSpecific_Minimum may be assigned by the vendor for use as
  417. ; * engine-specific variables. NOTE: These should be used only in exceptional circumstances,
  418. ; * as functions performed by these variables won't be generally accessible. All other tag
  419. ; * values are reserved.
  420. ; *
  421. ; *        kQATag_EngineSpecific_Minimum    Minimum tag value for drawing-engine specific variables
  422.  
  423.  
  424. ; typedef long                            TQATagInt
  425. kQATag_ZFunction                EQU        0
  426. kQATag_Antialias                EQU        8
  427. kQATag_Blend                    EQU        9
  428. kQATag_PerspectiveZ                EQU        10
  429. kQATag_TextureFilter            EQU        11
  430. kQATag_TextureOp                EQU        12
  431. kQATag_CSGTag                    EQU        14
  432. kQATag_CSGEquation                EQU        15
  433. kQATag_BufferComposite            EQU        16
  434. kQATag_FogMode                    EQU        17
  435. kQATag_ChannelMask                EQU        27
  436. kQATag_ZBufferMask                EQU        28
  437. kQATag_ZSortedHint                EQU        29
  438. kQATag_ChromakeyEnable            EQU        30
  439. kQATag_AlphaTestFunc            EQU        31
  440. kQATag_DontSwap                    EQU        32
  441. kQATag_MultiTextureEnable        EQU        33
  442. kQATag_MultiTextureCurrent        EQU        34
  443. kQATag_MultiTextureOp            EQU        35
  444. kQATag_MultiTextureFilter        EQU        36
  445. kQATag_MultiTextureWrapU        EQU        37
  446. kQATag_MultiTextureWrapV        EQU        38
  447. kQATag_MultiTextureMagFilter    EQU        39
  448. kQATag_MultiTextureMinFilter    EQU        40
  449. kQATag_BitmapFilter                EQU        54                    ; filter to use while scaling bitmaps, one of kQAFilter_xxx 
  450. kQATag_DrawContextFilter        EQU        55                    ; filter to use while scaling draw contexts, one of kQAFilter_xxx 
  451. kQATagGL_DrawBuffer                EQU        100
  452. kQATagGL_TextureWrapU            EQU        101
  453. kQATagGL_TextureWrapV            EQU        102
  454. kQATagGL_TextureMagFilter        EQU        103
  455. kQATagGL_TextureMinFilter        EQU        104
  456. kQATagGL_ScissorXMin            EQU        105
  457. kQATagGL_ScissorYMin            EQU        106
  458. kQATagGL_ScissorXMax            EQU        107
  459. kQATagGL_ScissorYMax            EQU        108
  460. kQATagGL_BlendSrc                EQU        109
  461. kQATagGL_BlendDst                EQU        110
  462. kQATagGL_LinePattern            EQU        111
  463. kQATagGL_AreaPattern0            EQU        117                    ; ...kQATagGL_AreaPattern1-30 
  464. kQATagGL_AreaPattern31            EQU        148
  465. kQATagGL_LinePatternFactor        EQU        149                    ; equivalent to GL_LINE_STIPPLE_REPEAT 
  466. kQATag_EngineSpecific_Minimum    EQU        1000
  467.  
  468. ; typedef long                            TQATagPtr
  469. kQATag_Texture                    EQU        13
  470. kQATag_MultiTexture                EQU        26
  471.  
  472. ; typedef long                            TQATagFloat
  473. kQATag_ColorBG_a                EQU        1
  474. kQATag_ColorBG_r                EQU        2
  475. kQATag_ColorBG_g                EQU        3
  476. kQATag_ColorBG_b                EQU        4
  477. kQATag_Width                    EQU        5
  478. kQATag_ZMinOffset                EQU        6
  479. kQATag_ZMinScale                EQU        7
  480. kQATag_FogColor_a                EQU        18
  481. kQATag_FogColor_r                EQU        19
  482. kQATag_FogColor_g                EQU        20
  483. kQATag_FogColor_b                EQU        21
  484. kQATag_FogStart                    EQU        22
  485. kQATag_FogEnd                    EQU        23
  486. kQATag_FogDensity                EQU        24
  487. kQATag_FogMaxDepth                EQU        25
  488. kQATag_MipmapBias                EQU        41
  489. kQATag_MultiTextureMipmapBias    EQU        42
  490. kQATag_Chromakey_r                EQU        43
  491. kQATag_Chromakey_g                EQU        44
  492. kQATag_Chromakey_b                EQU        45
  493. kQATag_AlphaTestRef                EQU        46
  494. kQATag_MultiTextureBorder_a        EQU        47
  495. kQATag_MultiTextureBorder_r        EQU        48
  496. kQATag_MultiTextureBorder_g        EQU        49
  497. kQATag_MultiTextureBorder_b        EQU        50
  498. kQATag_MultiTextureFactor        EQU        51
  499. kQATag_BitmapScale_x            EQU        52                    ; horizontal bitmap scale factor, default value is 1.0 
  500. kQATag_BitmapScale_y            EQU        53                    ; vertical bitmap scale factor, default value is 1.0 
  501. kQATag_MultiTextureEnvColor_a    EQU        56
  502. kQATag_MultiTextureEnvColor_r    EQU        57
  503. kQATag_MultiTextureEnvColor_g    EQU        58
  504. kQATag_MultiTextureEnvColor_b    EQU        59
  505. kQATagGL_DepthBG                EQU        112
  506. kQATagGL_TextureBorder_a        EQU        113
  507. kQATagGL_TextureBorder_r        EQU        114
  508. kQATagGL_TextureBorder_g        EQU        115
  509. kQATagGL_TextureBorder_b        EQU        116
  510. kQATagGL_TextureEnvColor_a        EQU        150
  511. kQATagGL_TextureEnvColor_r        EQU        151
  512. kQATagGL_TextureEnvColor_g        EQU        152
  513. kQATagGL_TextureEnvColor_b        EQU        153
  514.  
  515. ;  kQATag_ZFunction 
  516.  
  517. kQAZFunction_None                EQU        0                    ; Z is neither tested nor written (same as no Z buffer) 
  518. kQAZFunction_LT                    EQU        1                    ; Znew < Zbuffer is visible 
  519. kQAZFunction_EQ                    EQU        2                    ; Znew == Zbuffer is visible 
  520. kQAZFunction_LE                    EQU        3                    ; Znew <= Zbuffer is visible 
  521. kQAZFunction_GT                    EQU        4                    ; Znew > Zbuffer is visible 
  522. kQAZFunction_NE                    EQU        5                    ; Znew != Zbuffer is visible 
  523. kQAZFunction_GE                    EQU        6                    ; Znew >= Zbuffer is visible 
  524. kQAZFunction_True                EQU        7                    ; Znew is always visible 
  525. kQAZFunction_False                EQU        8                    ; Znew is never visible 
  526. ;  kQATag_Width 
  527. ;  kQATag_Antialias 
  528.  
  529. kQAAntiAlias_Off                EQU        0
  530. kQAAntiAlias_Fast                EQU        1
  531. kQAAntiAlias_Mid                EQU        2
  532. kQAAntiAlias_Best                EQU        3
  533. ;  kQATag_Blend 
  534.  
  535. kQABlend_PreMultiply            EQU        0
  536. kQABlend_Interpolate            EQU        1
  537. kQABlend_OpenGL                    EQU        2
  538. ;  kQATag_BufferComposite 
  539.  
  540. kQABufferComposite_None            EQU        0                    ; Default: New pixels overwrite initial buffer contents 
  541. kQABufferComposite_PreMultiply    EQU        1                    ; New pixels are blended with initial buffer contents via PreMultiply 
  542. kQABufferComposite_Interpolate    EQU        2                    ; New pixels are blended with initial buffer contents via Interpolate 
  543. ;  kQATag_PerspectiveZ 
  544.  
  545. kQAPerspectiveZ_Off                EQU        0                    ; Use Z for hidden surface removal 
  546. kQAPerspectiveZ_On                EQU        1                    ; Use InvW for hidden surface removal 
  547. ;  kQATag_TextureFilter 
  548.  
  549.                                                             ; suggested meanings of these values 
  550. kQATextureFilter_Fast            EQU        0                    ; No filtering, pick nearest 
  551. kQATextureFilter_Mid            EQU        1                    ; Fastest method that does some filtering 
  552. kQATextureFilter_Best            EQU        2                    ; Highest quality renderer can do 
  553. ;  filter tag values 
  554.  
  555.                                                             ; suggested meanings of these values 
  556. kQAFilter_Fast                    EQU        0                    ; No filtering, pick nearest 
  557. kQAFilter_Mid                    EQU        1                    ; Fastest method that does some filtering 
  558. kQAFilter_Best                    EQU        2                    ; Highest quality renderer can do 
  559. ;  kQATag_TextureOp (mask of one or more) 
  560.  
  561. kQATextureOp_None                EQU        0                    ; Default texture mapping mode 
  562. kQATextureOp_Modulate            EQU        $01                    ; Modulate texture color with kd_r/g/b 
  563. kQATextureOp_Highlight            EQU        $02                    ; Add highlight value ks_r/g/b 
  564. kQATextureOp_Decal                EQU        $04                    ; When texture alpha == 0, use rgb instead 
  565. kQATextureOp_Shrink                EQU        $08                    ; This is a non-wrapping texture, so the ??? 
  566. kQATextureOp_Blend                EQU        $10                    ; Same as GL_TEXTURE_ENV_MODE GL_BLEND 
  567. ;  kQATag_MultiTextureOp 
  568.  
  569. kQAMultiTexture_Add                EQU        0                    ; texels are added to form final pixel 
  570. kQAMultiTexture_Modulate        EQU        1                    ; texels are multiplied to form final pixel 
  571. kQAMultiTexture_BlendAlpha        EQU        2                    ; texels are blended according to 2nd texel's alpha 
  572. kQAMultiTexture_Fixed            EQU        3                    ; texels are blended by a fixed factor via kQATag_MultiTextureFactor  
  573. ;  kQATag_CSGTag 
  574.  
  575. kQACSGTag_0                        EQU        0                    ; Submitted tris have CSG ID 0 
  576. kQACSGTag_1                        EQU        1                    ; Submitted tris have CSG ID 1 
  577. kQACSGTag_2                        EQU        2                    ; Submitted tris have CSG ID 2 
  578. kQACSGTag_3                        EQU        3                    ; Submitted tris have CSG ID 3 
  579. kQACSGTag_4                        EQU        4                    ; Submitted tris have CSG ID 4 
  580. ;  kQATagGL_TextureWrapU/V 
  581.  
  582. kQAGL_Repeat                    EQU        0
  583. kQAGL_Clamp                        EQU        1
  584. ;  kQATagGL_BlendSrc 
  585.  
  586. kQAGL_SourceBlend_XXX            EQU        0
  587. ;  kQATagGL_BlendDst 
  588.  
  589. kQAGL_DestBlend_XXX                EQU        0
  590. ;  kQATagGL_DrawBuffer (mask of one or more) 
  591.  
  592. kQAGL_DrawBuffer_None            EQU        0
  593. kQAGL_DrawBuffer_FrontLeft        EQU        $01
  594. kQAGL_DrawBuffer_FrontRight        EQU        $02
  595. kQAGL_DrawBuffer_BackLeft        EQU        $04
  596. kQAGL_DrawBuffer_BackRight        EQU        $08
  597. kQAGL_DrawBuffer_Front            EQU        $03
  598. kQAGL_DrawBuffer_Back            EQU        $0C
  599. ;  kQATag_FogMode 
  600.  
  601. kQAFogMode_None                    EQU        0                    ; no fog                                    
  602. kQAFogMode_Alpha                EQU        1                    ; fog value is alpha                        
  603. kQAFogMode_Linear                EQU        2                    ; fog = (end - z) / (end - start)            
  604. kQAFogMode_Exponential            EQU        3                    ; fog = exp(-density * z)                    
  605. kQAFogMode_ExponentialSquared    EQU        4                    ; fog = exp(-density * z * density * z)    
  606.  
  607. ;  kQATag_ChannelMask 
  608.  
  609. kQAChannelMask_r                EQU        $01
  610. kQAChannelMask_g                EQU        $02
  611. kQAChannelMask_b                EQU        $04
  612. kQAChannelMask_a                EQU        $08
  613.  
  614. ;  kQATag_ZBufferMask 
  615.  
  616. kQAZBufferMask_Disable            EQU        0
  617. kQAZBufferMask_Enable            EQU        1
  618. ;  kQATag_AlphaTestFunc 
  619.  
  620. kQAAlphaTest_None                EQU        0
  621. kQAAlphaTest_LT                    EQU        1
  622. kQAAlphaTest_EQ                    EQU        2
  623. kQAAlphaTest_LE                    EQU        3
  624. kQAAlphaTest_GT                    EQU        4
  625. kQAAlphaTest_NE                    EQU        5
  626. kQAAlphaTest_GE                    EQU        6
  627. kQAAlphaTest_True                EQU        7
  628.  
  629. ;  flags for QAAccess__xxx 
  630.  
  631. kQANoCopyNeeded                    EQU        $01
  632.  
  633. ; ************************************************************************************************
  634. ; *
  635. ; * Constants used as function parameters.
  636. ; *
  637. ; **********************************************************************************************
  638.  
  639. ; * TQAVertexMode is a parameter to QADrawVGouraud() and QADrawVTexture() that specifies how
  640. ; * to interpret and draw the vertex array.
  641.  
  642.  
  643. ; typedef long                            TQAVertexMode
  644. kQAVertexMode_Point                EQU        0                    ; Draw nVertices points 
  645. kQAVertexMode_Line                EQU        1                    ; Draw nVertices/2 line segments 
  646. kQAVertexMode_Polyline            EQU        2                    ; Draw nVertices-1 connected line segments 
  647. kQAVertexMode_Tri                EQU        3                    ; Draw nVertices/3 triangles 
  648. kQAVertexMode_Strip                EQU        4                    ; Draw nVertices-2 triangles as a strip 
  649. kQAVertexMode_Fan                EQU        5                    ; Draw nVertices-2 triangles as a fan from v0 
  650. kQAVertexMode_NumModes            EQU        6
  651. ; * TQAGestaltSelector is a parameter to QAEngineGestalt(). It selects which gestalt
  652. ; * parameter will be copied into 'response'.
  653.  
  654.  
  655. ; typedef long                            TQAGestaltSelector
  656. kQAGestalt_OptionalFeatures        EQU        0                    ; Mask of one or more kQAOptional_xxx 
  657. kQAGestalt_FastFeatures            EQU        1                    ; Mask of one or more kQAFast_xxx 
  658. kQAGestalt_VendorID                EQU        2                    ; Vendor ID 
  659. kQAGestalt_EngineID                EQU        3                    ; Engine ID 
  660. kQAGestalt_Revision                EQU        4                    ; Revision number of this engine 
  661. kQAGestalt_ASCIINameLength        EQU        5                    ; strlen (asciiName) 
  662. kQAGestalt_ASCIIName            EQU        6                    ; Causes strcpy (response, asciiName) 
  663. kQAGestalt_TextureMemory        EQU        7                    ; amount of texture RAM currently available 
  664. kQAGestalt_FastTextureMemory    EQU        8                    ; amount of texture RAM currently available 
  665. kQAGestalt_DrawContextPixelTypesAllowed EQU 9                ; returns all the draw context pixel types supported by the RAVE engine 
  666. kQAGestalt_DrawContextPixelTypesPreferred EQU 10            ; returns all the draw context pixel types that are preferred by the RAVE engine. 
  667. kQAGestalt_TexturePixelTypesAllowed EQU    11                    ; returns all the texture pixel types that are supported by the RAVE engine 
  668. kQAGestalt_TexturePixelTypesPreferred EQU 12                ; returns all the texture pixel types that are preferred by the RAVE engine.
  669. kQAGestalt_BitmapPixelTypesAllowed EQU    13                    ; returns all the bitmap pixel types that are supported by the RAVE engine. 
  670. kQAGestalt_BitmapPixelTypesPreferred EQU 14                    ; returns all the bitmap pixel types that are preferred by the RAVE engine. 
  671. kQAGestalt_OptionalFeatures2    EQU        15                    ; Mask of one or more kQAOptional2_xxx 
  672. kQAGestalt_MultiTextureMax        EQU        16                    ; max number of multi textures supported by this engine 
  673. kQAGestalt_NumSelectors            EQU        17
  674. kQAGestalt_EngineSpecific_Minimum EQU    1000                ; all gestalts here and above are for engine specific purposes 
  675. ; * TQAMethodSelector is a parameter to QASetNoticeMethod to select the notice method
  676.  
  677.     IF RAVE_OBSOLETE THEN
  678.  
  679. ; typedef long                            TQAMethodSelector
  680. kQAMethod_RenderCompletion        EQU        0                    ; Called when rendering has completed and buffers swapped 
  681. kQAMethod_DisplayModeChanged    EQU        1                    ; Called when a display mode has changed 
  682. kQAMethod_ReloadTextures        EQU        2                    ; Called when texture memory has been invalidated 
  683. kQAMethod_BufferInitialize        EQU        3                    ; Called when a buffer needs to be initialized 
  684. kQAMethod_BufferComposite        EQU        4                    ; Called when rendering is finished and its safe to composite 
  685. kQAMethod_NumSelectors            EQU        5
  686.     ELSE
  687.  
  688. ; typedef long                            TQAMethodSelector
  689. kQAMethod_RenderCompletion        EQU        0                    ; Called when rendering has completed and buffers swapped 
  690. kQAMethod_DisplayModeChanged    EQU        1                    ; Called when a display mode has changed 
  691. kQAMethod_ReloadTextures        EQU        2                    ; Called when texture memory has been invalidated 
  692. kQAMethod_ImageBufferInitialize    EQU        3                    ; Called when a buffer needs to be initialized 
  693. kQAMethod_ImageBuffer2DComposite EQU    4                    ; Called when rendering is finished and its safe to composite 
  694. kQAMethod_NumSelectors            EQU        5
  695.     ENDIF    ; RAVE_OBSOLETE
  696. ; * kQATriFlags_xxx are ORed together to generate the 'flags' parameter
  697. ; * to QADrawTriGouraud() and QADrawTriTexture().
  698.  
  699.  
  700. kQATriFlags_None                EQU        0                    ; No flags (triangle is front-facing or don't care) 
  701. kQATriFlags_Backfacing            EQU        $01                    ; Triangle is back-facing 
  702. ; * kQATexture_xxx are ORed together to generate the 'flags' parameter to QATextureNew().
  703.  
  704.  
  705. kQATexture_None                    EQU        0                    ; No flags 
  706. kQATexture_Lock                    EQU        $01                    ; Don't swap this texture out 
  707. kQATexture_Mipmap                EQU        $02                    ; This texture is mipmapped 
  708. kQATexture_NoCompression        EQU        $04                    ; Do not compress this texture 
  709. kQATexture_HighCompression        EQU        $08                    ; Compress texture, even if it takes a while 
  710. kQATexture_NonRelocatable        EQU        $10                    ; Image buffer in VRAM should be non-relocatable 
  711. kQATexture_NoCopy                EQU        $20                    ; Don't copy image to VRAM when creating it 
  712. kQATexture_FlipOrigin            EQU        $40                    ; The image(s) is(are) in a bottom-up format. (The image(s) is(are) flipped vertically.) 
  713. kQATexture_PriorityBits            EQU        $F0000000            ; Texture priority: 4 upper bits for 16 levels of priority 
  714. ; * kQABitmap_xxx are ORed together to generate the 'flags' parameter to QABitmapNew().
  715.  
  716.  
  717. kQABitmap_None                    EQU        0                    ; No flags 
  718. kQABitmap_Lock                    EQU        $02                    ; Don't swap this bitmap out 
  719. kQABitmap_NoCompression            EQU        $04                    ; Do not compress this bitmap 
  720. kQABitmap_HighCompression        EQU        $08                    ; Compress bitmap, even if it takes a while 
  721. kQABitmap_NonRelocatable        EQU        $10                    ; Image buffer in VRAM should be non-relocatable 
  722. kQABitmap_NoCopy                EQU        $20                    ; Don't copy image to VRAM when creating it 
  723. kQABitmap_FlipOrigin            EQU        $40                    ; The image is in a bottom-up format. (The image is flipped vertically.) 
  724. kQABitmap_PriorityBits            EQU        $F0000000            ; Bitmap priority: 4 upper bits for 16 levels of priority 
  725. ; * kQAContext_xxx are ORed together to generate the 'flags' parameter for QADrawContextNew().
  726.  
  727.  
  728. kQAContext_None                    EQU        0                    ; No flags 
  729. kQAContext_NoZBuffer            EQU        $01                    ; No hidden surface removal 
  730. kQAContext_DeepZ                EQU        $02                    ; Hidden surface precision >= 24 bits 
  731. kQAContext_DoubleBuffer            EQU        $04                    ; Double buffered window 
  732. kQAContext_Cache                EQU        $08                    ; This is a cache context 
  733. kQAContext_NoDither                EQU        $10                    ; No dithering, straight color banding 
  734. kQAContext_Scale                EQU        $20                    ; The draw context is to be scaled.  The front buffer is a different size than the back buffer. 
  735. kQAContext_NonRelocatable        EQU        $40                    ; The back buffer and the z buffer must not move in memory 
  736. kQAContext_EngineSpecific1        EQU        $10000000            ; engine specific flag # 1 
  737. kQAContext_EngineSpecific2        EQU        $20000000            ; engine specific flag # 2 
  738. kQAContext_EngineSpecific3        EQU        $40000000            ; engine specific flag # 3 
  739. kQAContext_EngineSpecific4        EQU        $80000000            ; engine specific flag # 4 
  740. ; * kQAOptional_xxx are ORed together to generate the kQAGestalt_OptionalFeatures response
  741. ; * from QAEngineGestalt().
  742.  
  743.  
  744. kQAOptional_None                EQU        0                    ; No optional features 
  745. kQAOptional_DeepZ                EQU        $01                    ; Hidden surface precision >= 24 bits 
  746. kQAOptional_Texture                EQU        $02                    ; Texture mapping 
  747. kQAOptional_TextureHQ            EQU        $04                    ; High quality texture (tri-linear mip or better) 
  748. kQAOptional_TextureColor        EQU        $08                    ; Full color modulation and highlight of textures 
  749. kQAOptional_Blend                EQU        $10                    ; Transparency blending of RGB 
  750. kQAOptional_BlendAlpha            EQU        $20                    ; Transparency blending includes alpha channel 
  751. kQAOptional_Antialias            EQU        $40                    ; Antialiased rendering 
  752. kQAOptional_ZSorted                EQU        $80                    ; Z sorted rendering (for transparency, etc.) 
  753. kQAOptional_PerspectiveZ        EQU        $0100                ; Hidden surface removal using InvW instead of Z 
  754. kQAOptional_OpenGL                EQU        $0200                ; Extended rasterization features for OpenGLâ„¢ 
  755. kQAOptional_NoClear                EQU        $0400                ; This drawing engine doesn't clear before drawing 
  756. kQAOptional_CSG                    EQU        $0800                ; kQATag_CSGxxx are implemented 
  757. kQAOptional_BoundToDevice        EQU        $1000                ; This engine is tightly bound to GDevice 
  758. kQAOptional_CL4                    EQU        $2000                ; This engine suports kQAPixel_CL4 
  759. kQAOptional_CL8                    EQU        $4000                ; This engine suports kQAPixel_CL8 
  760. kQAOptional_BufferComposite        EQU        $8000                ; This engine can composite with initial buffer contents 
  761. kQAOptional_NoDither            EQU        $00010000            ; This engine can draw with no dithering 
  762. kQAOptional_FogAlpha            EQU        $00020000            ; This engine suports alpha based fog 
  763. kQAOptional_FogDepth            EQU        $00040000            ; This engine suports depth based fog 
  764. kQAOptional_MultiTextures        EQU        $00080000            ; This bit set if engine supports texture compositing 
  765. kQAOptional_MipmapBias            EQU        $00100000            ; This bit is set if the engine supports mipmap selection bias 
  766. kQAOptional_ChannelMask            EQU        $00200000
  767. kQAOptional_ZBufferMask            EQU        $00400000
  768. kQAOptional_AlphaTest            EQU        $00800000            ; this engine supports alpha testing 
  769. kQAOptional_AccessTexture        EQU        $01000000            ; if engine supports access to texture 
  770. kQAOptional_AccessBitmap        EQU        $02000000            ; if engine supports access to bitmaps 
  771. kQAOptional_AccessDrawBuffer    EQU        $04000000            ; if engine supports access to draw buffer 
  772. kQAOptional_AccessZBuffer        EQU        $08000000            ; if engine supports access to zbuffer 
  773. kQAOptional_ClearDrawBuffer        EQU        $10000000            ; if engine supports QAClearDrawBuffer() 
  774. kQAOptional_ClearZBuffer        EQU        $20000000            ; if engine supports QAClearZBuffer() 
  775. kQAOptional_OffscreenDrawContexts EQU    $40000000            ; if engine supports TQADeviceOffscreen 
  776. ; * kQAOptional2_xxx are ORed together to generate the kQAGestalt_OptionalFeatures2 response
  777. ; * from QAEngineGestalt().
  778.  
  779.  
  780. kQAOptional2_None                EQU        0
  781. kQAOptional2_TextureDrawContexts EQU    $02                    ; if engine supports QATextureNewFromDrawContext() 
  782. kQAOptional2_BitmapDrawContexts    EQU        $04                    ; if engine supports QABitmapNewFromDrawContext() 
  783. kQAOptional2_Busy                EQU        $08                    ; if engine supports QABusy() 
  784. kQAOptional2_SwapBuffers        EQU        $10                    ; if engine supports QASwapBuffers() 
  785. kQAOptional2_Chromakey            EQU        $20                    ; if engine supports chromakeying via kQATag_Chromakey_xxx 
  786. kQAOptional2_NonRelocatable        EQU        $40                    ; if engine supports nonrelocatable texture & bitmap image buffers in VRAM 
  787. kQAOptional2_NoCopy                EQU        $80                    ; if engine supports ability to not copy texture & bitmap image to VRAM 
  788. kQAOptional2_PriorityBits        EQU        $0100                ; if engine supports texture & bitmap priority levels 
  789. kQAOptional2_FlipOrigin            EQU        $0200                ; if engine supports textures & bitmaps that are vertically flipped 
  790. kQAOptional2_BitmapScale        EQU        $0400                ; if engine supports scaled bitmap drawing 
  791. kQAOptional2_DrawContextScale    EQU        $0800                ; if engine supports scaled draw contexts 
  792. kQAOptional2_DrawContextNonRelocatable EQU $1000            ; if engine supports draw contexts with non relocatable buffers 
  793.  
  794. ; * kQAFast_xxx are ORed together to generate the kQAGestalt_FastFeatures response
  795. ; * from QAEngineGestalt().
  796.  
  797.  
  798. kQAFast_None                    EQU        0                    ; No accelerated features 
  799. kQAFast_Line                    EQU        $01                    ; Line drawing 
  800. kQAFast_Gouraud                    EQU        $02                    ; Gouraud shaded triangles 
  801. kQAFast_Texture                    EQU        $04                    ; Texture mapped triangles 
  802. kQAFast_TextureHQ                EQU        $08                    ; High quality texture (tri-linear mip or better) 
  803. kQAFast_Blend                    EQU        $10                    ; Transparency blending 
  804. kQAFast_Antialiasing            EQU        $20                    ; Antialiased rendering 
  805. kQAFast_ZSorted                    EQU        $40                    ; Z sorted rendering of non-opaque objects 
  806. kQAFast_CL4                        EQU        $80                    ; This engine accelerates kQAPixel_CL4 
  807. kQAFast_CL8                        EQU        $0100                ; This engine accelerates kQAPixel_CL8 
  808. kQAFast_FogAlpha                EQU        $0200                ; This engine accelerates alpha based fog 
  809. kQAFast_FogDepth                EQU        $0400                ; This engine accelerates depth based fog 
  810. kQAFast_MultiTextures            EQU        $0800                ; This engine accelerates texture compositing 
  811. kQAFast_BitmapScale                EQU        $1000                ; This engine accelerates scaled bitmap drawing 
  812. kQAFast_DrawContextScale        EQU        $2000                ; This engine accelerates scaled draw contexts 
  813.  
  814.  
  815.  
  816.  
  817.  
  818. ; ********************************************************************
  819. ; * TQAVersion sets the TQADrawContext 'version' field. It is set by
  820. ; * the manager to indicate the version of the TQADrawContext structure.
  821. ; ******************************************************************
  822.  
  823.  
  824. ; typedef long                            TQAVersion
  825. kQAVersion_Prerelease            EQU        0
  826. kQAVersion_1_0                    EQU        1
  827. kQAVersion_1_0_5                EQU        2                    ; Added tri mesh functions, color tables 
  828. kQAVersion_1_5                    EQU        3                    ; Added call backs, texture compression, and new error return code 
  829. kQAVersion_1_6                    EQU        4                    ; Added QAAccess_xxx, fog, _Options2, Clear_xxx, etc. 
  830.  
  831.  
  832. ; ***********************************************************************
  833. ; * TQADrawContext structure holds method pointers.
  834. ; * This is a forward refrence. The structure is defined later.
  835. ; *********************************************************************
  836.  
  837.  
  838.  
  839. ; ************************************************************************************************
  840. ; *
  841. ; * Typedefs of draw method functions provided by the drawing engine. One function pointer
  842. ; * for each of these function types in stored in the TQADrawContext public data structure.
  843. ; *
  844. ; * These functions should be accessed through the QA<function>(context,...) macros,
  845. ; * defined above.
  846. ; *
  847. ; **********************************************************************************************
  848.  
  849. TQANoticeMethod            RECORD 0
  850. standardNoticeMethod     ds.l    1                ; offset: $0 (0)        ;  Used for non-buffer related methods 
  851.                          ORG 0
  852. bufferNoticeMethod         ds.l    1                ; offset: $0 (0)        ;  Used for buffer handling methods 
  853. sizeof                     EQU *                    ; size:   $4 (4)
  854.                         ENDR
  855. ; ************************************************************************************************
  856. ; *
  857. ; * Public TQADrawContext structure. This contains function pointers for the chosen
  858. ; * drawing engine.
  859. ; *
  860. ; **********************************************************************************************
  861.  
  862. TQADrawContext            RECORD 0
  863. drawPrivate                 ds.l    1                ; offset: $0 (0)        ;  Engine's private data for this context 
  864. version                     ds.l    1                ; offset: $4 (4)        ;  Version number 
  865. setFloat                 ds.l    1                ; offset: $8 (8)        ;  Method: Set a float state variable 
  866. setInt                     ds.l    1                ; offset: $C (12)        ;  Method: Set an unsigned long state variable 
  867. setPtr                     ds.l    1                ; offset: $10 (16)        ;  Method: Set an unsigned long state variable 
  868. getFloat                 ds.l    1                ; offset: $14 (20)        ;  Method: Get a float state variable 
  869. getInt                     ds.l    1                ; offset: $18 (24)        ;  Method: Get an unsigned long state variable 
  870. getPtr                     ds.l    1                ; offset: $1C (28)        ;  Method: Get an pointer state variable 
  871. drawPoint                 ds.l    1                ; offset: $20 (32)        ;  Method: Draw a point 
  872. drawLine                 ds.l    1                ; offset: $24 (36)        ;  Method: Draw a line 
  873. drawTriGouraud             ds.l    1                ; offset: $28 (40)        ;  Method: Draw a Gouraud shaded triangle 
  874. drawTriTexture             ds.l    1                ; offset: $2C (44)        ;  Method: Draw a texture mapped triangle 
  875. drawVGouraud             ds.l    1                ; offset: $30 (48)        ;  Method: Draw Gouraud vertices 
  876. drawVTexture             ds.l    1                ; offset: $34 (52)        ;  Method: Draw texture vertices 
  877. drawBitmap                 ds.l    1                ; offset: $38 (56)        ;  Method: Draw a bitmap 
  878. renderStart                 ds.l    1                ; offset: $3C (60)        ;  Method: Initialize for rendering 
  879. renderEnd                 ds.l    1                ; offset: $40 (64)        ;  Method: Complete rendering and display 
  880. renderAbort                 ds.l    1                ; offset: $44 (68)        ;  Method: Abort any outstanding rendering (blocking) 
  881. flush                     ds.l    1                ; offset: $48 (72)        ;  Method: Start render of any queued commands (non-blocking) 
  882. sync                     ds.l    1                ; offset: $4C (76)        ;  Method: Wait for completion of all rendering (blocking) 
  883. submitVerticesGouraud     ds.l    1                ; offset: $50 (80)        ;  Method: Submit Gouraud vertices for trimesh 
  884. submitVerticesTexture     ds.l    1                ; offset: $54 (84)        ;  Method: Submit Texture vertices for trimesh 
  885. drawTriMeshGouraud         ds.l    1                ; offset: $58 (88)        ;  Method: Draw a Gouraud triangle mesh 
  886. drawTriMeshTexture         ds.l    1                ; offset: $5C (92)        ;  Method: Draw a Texture triangle mesh 
  887. setNoticeMethod             ds.l    1                ; offset: $60 (96)        ;  Method: Set a notice method 
  888. getNoticeMethod             ds.l    1                ; offset: $64 (100)        ;  Method: Get a notice method 
  889. submitMultiTextureParams  ds.l    1                ; offset: $68 (104)        ;  Method: Submit Secondary texture params 
  890. accessDrawBuffer         ds.l    1                ; offset: $6C (108)
  891. accessDrawBufferEnd         ds.l    1                ; offset: $70 (112)
  892. accessZBuffer             ds.l    1                ; offset: $74 (116)
  893. accessZBufferEnd         ds.l    1                ; offset: $78 (120)
  894. clearDrawBuffer             ds.l    1                ; offset: $7C (124)
  895. clearZBuffer             ds.l    1                ; offset: $80 (128)
  896. textureFromContext         ds.l    1                ; offset: $84 (132)
  897. bitmapFromContext         ds.l    1                ; offset: $88 (136)
  898. busy                     ds.l    1                ; offset: $8C (140)
  899. swapBuffers                 ds.l    1                ; offset: $90 (144)
  900. sizeof                     EQU *                    ; size:   $94 (148)
  901.                         ENDR
  902. ; ************************************************************************************************
  903. ; *
  904. ; * Acceleration manager function prototypes.
  905. ; *
  906. ; **********************************************************************************************
  907.  
  908. ;
  909. ; extern TQAError QADrawContextNew(const TQADevice *device, const TQARect *rect, const TQAClip *clip, const TQAEngine *engine, unsigned long flags, TQADrawContext **newDrawContext)
  910. ;
  911.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  912.         IMPORT_CFM_FUNCTION QADrawContextNew
  913.     ENDIF
  914.  
  915. ;
  916. ; extern void QADrawContextDelete(TQADrawContext *drawContext)
  917. ;
  918.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  919.         IMPORT_CFM_FUNCTION QADrawContextDelete
  920.     ENDIF
  921.  
  922. ;
  923. ; extern TQAError QAColorTableNew(const TQAEngine *engine, TQAColorTableType tableType, void *pixelData, long transparentIndexFlag, TQAColorTable **newTable)
  924. ;
  925.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  926.         IMPORT_CFM_FUNCTION QAColorTableNew
  927.     ENDIF
  928.  
  929. ;
  930. ; extern void QAColorTableDelete(const TQAEngine *engine, TQAColorTable *colorTable)
  931. ;
  932.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  933.         IMPORT_CFM_FUNCTION QAColorTableDelete
  934.     ENDIF
  935.  
  936. ;
  937. ; extern TQAError QATextureNew(const TQAEngine *engine, unsigned long flags, TQAImagePixelType pixelType, const TQAImage images[], TQATexture **newTexture)
  938. ;
  939.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  940.         IMPORT_CFM_FUNCTION QATextureNew
  941.     ENDIF
  942.  
  943. ;
  944. ; extern TQAError QATextureDetach(const TQAEngine *engine, TQATexture *texture)
  945. ;
  946.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  947.         IMPORT_CFM_FUNCTION QATextureDetach
  948.     ENDIF
  949.  
  950. ;
  951. ; extern void QATextureDelete(const TQAEngine *engine, TQATexture *texture)
  952. ;
  953.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  954.         IMPORT_CFM_FUNCTION QATextureDelete
  955.     ENDIF
  956.  
  957. ;
  958. ; extern TQAError QATextureBindColorTable(const TQAEngine *engine, TQATexture *texture, TQAColorTable *colorTable)
  959. ;
  960.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  961.         IMPORT_CFM_FUNCTION QATextureBindColorTable
  962.     ENDIF
  963.  
  964. ;
  965. ; extern TQAError QABitmapNew(const TQAEngine *engine, unsigned long flags, TQAImagePixelType pixelType, const TQAImage *image, TQABitmap **newBitmap)
  966. ;
  967.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  968.         IMPORT_CFM_FUNCTION QABitmapNew
  969.     ENDIF
  970.  
  971. ;
  972. ; extern TQAError QABitmapDetach(const TQAEngine *engine, TQABitmap *bitmap)
  973. ;
  974.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  975.         IMPORT_CFM_FUNCTION QABitmapDetach
  976.     ENDIF
  977.  
  978. ;
  979. ; extern void QABitmapDelete(const TQAEngine *engine, TQABitmap *bitmap)
  980. ;
  981.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  982.         IMPORT_CFM_FUNCTION QABitmapDelete
  983.     ENDIF
  984.  
  985. ;
  986. ; extern TQAError QABitmapBindColorTable(const TQAEngine *engine, TQABitmap *bitmap, TQAColorTable *colorTable)
  987. ;
  988.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  989.         IMPORT_CFM_FUNCTION QABitmapBindColorTable
  990.     ENDIF
  991.  
  992. ;
  993. ; extern TQAEngine *QADeviceGetFirstEngine(const TQADevice *device)
  994. ;
  995.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  996.         IMPORT_CFM_FUNCTION QADeviceGetFirstEngine
  997.     ENDIF
  998.  
  999. ;
  1000. ; extern TQAEngine *QADeviceGetNextEngine(const TQADevice *device, const TQAEngine *currentEngine)
  1001. ;
  1002.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1003.         IMPORT_CFM_FUNCTION QADeviceGetNextEngine
  1004.     ENDIF
  1005.  
  1006. ;
  1007. ; extern TQAError QAEngineCheckDevice(const TQAEngine *engine, const TQADevice *device)
  1008. ;
  1009.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1010.         IMPORT_CFM_FUNCTION QAEngineCheckDevice
  1011.     ENDIF
  1012.  
  1013. ;
  1014. ; extern TQAError QAEngineGestalt(const TQAEngine *engine, TQAGestaltSelector selector, void *response)
  1015. ;
  1016.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1017.         IMPORT_CFM_FUNCTION QAEngineGestalt
  1018.     ENDIF
  1019.  
  1020. ;
  1021. ; extern TQAError QAEngineEnable(long vendorID, long engineID)
  1022. ;
  1023.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1024.         IMPORT_CFM_FUNCTION QAEngineEnable
  1025.     ENDIF
  1026.  
  1027. ;
  1028. ; extern TQAError QAEngineDisable(long vendorID, long engineID)
  1029. ;
  1030.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1031.         IMPORT_CFM_FUNCTION QAEngineDisable
  1032.     ENDIF
  1033.  
  1034.  
  1035. ;
  1036. ; extern TQAError QAAccessTexture(const TQAEngine *engine, TQATexture *texture, long mipmapLevel, long flags, TQAPixelBuffer *buffer)
  1037. ;
  1038.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1039.         IMPORT_CFM_FUNCTION QAAccessTexture
  1040.     ENDIF
  1041.  
  1042. ;
  1043. ; extern TQAError QAAccessTextureEnd(const TQAEngine *engine, TQATexture *texture, const TQARect *dirtyRect)
  1044. ;
  1045.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1046.         IMPORT_CFM_FUNCTION QAAccessTextureEnd
  1047.     ENDIF
  1048.  
  1049. ;
  1050. ; extern TQAError QAAccessBitmap(const TQAEngine *engine, TQABitmap *bitmap, long flags, TQAPixelBuffer *buffer)
  1051. ;
  1052.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1053.         IMPORT_CFM_FUNCTION QAAccessBitmap
  1054.     ENDIF
  1055.  
  1056. ;
  1057. ; extern TQAError QAAccessBitmapEnd(const TQAEngine *engine, TQABitmap *bitmap, const TQARect *dirtyRect)
  1058. ;
  1059.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1060.         IMPORT_CFM_FUNCTION QAAccessBitmapEnd
  1061.     ENDIF
  1062.  
  1063.  
  1064.  
  1065.  
  1066.     IF TARGET_OS_MAC THEN
  1067. ;
  1068. ; extern TQAError QARegisterDrawNotificationProc(Rect *globalRect, TQADrawNotificationProcPtr proc, long refCon, TQADrawNotificationProcRefNum *refNum)
  1069. ;
  1070.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1071.         IMPORT_CFM_FUNCTION QARegisterDrawNotificationProc
  1072.     ENDIF
  1073.  
  1074. ;
  1075. ; extern TQAError QAUnregisterDrawNotificationProc(TQADrawNotificationProcRefNum refNum)
  1076. ;
  1077.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1078.         IMPORT_CFM_FUNCTION QAUnregisterDrawNotificationProc
  1079.     ENDIF
  1080.  
  1081.     ENDIF    ; TARGET_OS_MAC
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.     ENDIF ; __RAVE__ 
  1089.  
  1090.